// /utils/bluetooth/index.ts
import { m_initBluetooth } from './bluetooth-uni'
import { mc_initBluetooth } from './bluetooth-harmony'

let instance : any = null

export function initBluetooth() {
	// 🧩 如果是鸿蒙（HARMONY 环境）
	// #ifdef APP-HARMONY
	console.log(!instance);
	if (!instance) instance = mc_initBluetooth()
	return instance
	// #endif

	// 🧩 非鸿蒙（Android / iOS）
	// #ifndef APP-HARMONY
	if (!instance) instance = m_initBluetooth()

	// if (!instance) instance = new BluetoothManager()
	return instance
	// #endif
}